package org.leon.controller;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.leon.bean.UserBeanForFormatter;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by Administrator on 2017/4/23.
 */
@Controller
public class FormatterController {
    private static  final Log logger = LogFactory.getLog(FormatterController.class);

    @RequestMapping(value = "/formatter", method = RequestMethod.POST)
    public String test(@ModelAttribute("user") UserBeanForFormatter user, Model model){
        logger.info(user);
        model.addAttribute("user", user);
        return "testFormatterSuccess";
    }
}
